pub fn new_birthday_probability(n: u32) -> f64 {
    if n == 0 || n == 1 {
        return 0.0;
    }
    let days_in_year = 365;
    let mut probability = 1.0;

    for i in 0..n {
        probability *= (days_in_year - i as i32) as f64 / days_in_year as f64;
    }

    1.0 - probability
}
